
// Triggered by a public Variable call for the marker positions
// We have to work out whether we should show a marker based on what side we're
// on...

// CLIENT SIDE!!!!!

// TODO : We could have the three markers as part of one array---but whatever.

// TODO : We should create the local marker's here...
HS_Handle_Show_Base_Markers= {
    diag_log "Updating Base Marker";
	private ["_markerArray"];
	_markerArray= (_this select 0);
    
	diag_log format["Player Side:%1  Marker BLUFOR %2, Marker OPFOR %3, Marker INDFOR %4", (side player), (_markerArray select 0), (_markerArray select 1), (_markerArray select 2)];

	switch (side player) do
	{
		case civilian:
		{
			diag_log "Civilian, so no marker...";
			player setPos [(_markerArray select 2) select 0, (_markerArray select 2) select 1, 0]; 
		};
		case west:
		{
			diag_log "Creating marker for west base...";
			["westBase", (_markerArray select 0), "Icon", [1,1], "COLOR:","ColorGreen","TYPE:","Depot"] call CBA_fnc_createMarker;
			player setPos [(_markerArray select 0) select 0, (_markerArray select 0) select 1, 0]; 
		};
		case east:
		{
			diag_log "Creating marker for east base...";
			["eastBase", (_markerArray select 1), "Icon", [1,1], "COLOR:","ColorGreen","TYPE:","Depot"] call CBA_fnc_createMarker;
			player setPos [(_markerArray select 1) select 0, (_markerArray select 1) select 1, 0]; 
		};
		case resistance:
		{
			diag_log "Creating marker for guer base...";
			["resBase", (_markerArray select 2), "Icon", [1,1], "COLOR:","ColorGreen","TYPE:","Depot"] call CBA_fnc_createMarker;
			player setPos [(_markerArray select 2) select 0, (_markerArray select 2) select 1, 0]; 
		};
		default
		{	
			diag_log "Unrecognised side...server?";
		};
	};
}
